import re
import datetime

# 赋值表达式
a = [1, 2, 3]
if (n := len(a)) < 10:
    print(f"List is too long ({n} elements, expected <= 10)")

# discount = 0.0
# advertisement = "111"
# if (mo := re.search(r'(\d+)% discount', advertisement)):
#     discount = float(mo.group(1)) / 100.0
#     print(discount)
# [clean_name.title() for name in names
#  if (clean_name := normalize('NFC', name)) in allowed_names]
user = 'eric_idle'
member_since = datetime.date(1975, 7, 31)

print(f'{user=} {member_since=}')
"user='eric_idle' member_since=datetime.date(1975, 7, 31)"
